# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=kcolorscheme
pkgver=6.1.0
pkgrel=0
pkgdesc="Classes to read and interact with KColorScheme"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-or-later AND LGPL-2.0-only AND LGPL-2.1-or-later"
makedepends="
	doxygen
	extra-cmake-modules
	graphviz
	kconfig-dev
	kguiaddons-dev
	ki18n-dev
	qt6-qtbase-dev
	qt6-qttools-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/kcolorscheme.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kcolorscheme-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}
sha512sums="
0a23e54f0575fe6bd353b8559869683e273288413bcc0549915ae29572390780f7c2b1eacb39df08d80601669b380a07f126b5be909b1d8a6f8fe20e391a31f8  kcolorscheme-6.1.0.tar.xz
"
